<%@page contentType="text/html; charset=UTF-8" %>

<script>
    jQuery(function ($) {
        // 将指定的表单提交注册为ajax提交
        $("#editForm").ajaxForm(function (data) {
            $("#mainDiv").html(data);
        });
    })
</script>

<div class="page-header">
    <h3>修改字典类型</h3>
</div>
<div style="width: 60%;">
    <form id="editForm" action="/type/edit" method="post" class="form-horizontal" role="form">
        <div class="form-group">
            <label for="edit-code" class="col-sm-2 control-label">
                编码<span style="color: red;">*</span>
            </label>
            <div class="col-sm-10">
                <input name="code" readonly type="text" class="form-control" id="edit-code" placeholder="编码作为主键，不能是中文" value="${type.code}">
            </div>
        </div>

        <div class="form-group">
            <label for="edit-name" class="col-sm-2 control-label">名称&nbsp;</label>
            <div class="col-sm-10">
                <input name="name" type="text" class="form-control" id="edit-name" value="${type.name}">
            </div>
        </div>

        <div class="form-group">
            <label for="edit-describe" class="col-sm-2 control-label">描述&nbsp;</label>
            <div class="col-sm-10">
                <textarea name="description" class="form-control" rows="3" id="edit-describe">${type.description}</textarea>
            </div>
        </div>
        <div style="text-align: center">
            <button type="submit" class="btn btn-primary" style="margin-right: 20px">修改</button>
            <button type="button" class="btn btn-default" onclick="back()">取消</button>
        </div>
    </form>
</div>